package com.algorithm.testutils;/*
 *@Author:DOWN
 *@Date:2021/12/11 15:14
 *@Comment:
 */

public class ArrayGenerator {
    //私有类
    private ArrayGenerator() {
    }

    public static Integer[] getArrays(int n) {
        Integer[] arr = new Integer[n];
        for (int i = 0; i < n; i++) {
            arr[i] = i;
        }
        return arr;
    }

    //乱序
    public static Integer[] getRandomArrays(int n,int random) {
        Integer[] arr = new Integer[n];
        for (int i = 0; i < n; i++) {
            int one = (int) (Math.random() * random);
            arr[i] = one;
        }
        return arr;
    }
}
